First, we used a predator dataset to check whether we need to consider phylogeney. If so, we will use predator and prey datasets for following meta-analysis.
Study_ID Cohort_ID Shared_control_ID Year
Length:117 Length:117 Length:117 Min. :1957
Class :character Class :character Class :character 1st Qu.:2009
Mode :character Mode :character Mode :character Median :2009
Mean :2005
3rd Qu.:2013
Max. :2016
Country Data_source Data_location Bird_species
Length:117 Length:117 Length:117 Length:117
Class :character Class :character Class :character Class :character
Mode :character Mode :character Mode :character Mode :character
Bird_common_name Prey_species Prey_common_name Response
Length:117 Length:117 Length:117 Length:117
Class :character Class :character Class :character Class :character
Mode :character Mode :character Mode :character Mode :character
Measure Direction Detail_result Note_result
Length:117 Length:117 Length:117 Length:117
Class :character Class :character Class :character Class :character
Mode :character Mode :character Mode :character Mode :character
Treatment_stimulus Number_pattern Diameter_pattern Area_pattern
Length:117 Min. :1.00 Min. : 2.20 Min. : 3.801
Class :character 1st Qu.:1.00 1st Qu.: 4.50 1st Qu.: 15.904
Mode :character Median :2.00 Median :20.00 Median : 87.715
Mean :1.94 Mean :15.29 Mean :254.622
3rd Qu.:2.00 3rd Qu.:25.00 3rd Qu.:489.697
Max. :5.00 Max. :31.28 Max. :490.874
Area_background Area_ratio Shape_pattern Control_stimulus
Min. : 225 Min. :0.01383 Length:117 Length:117
1st Qu.: 1000 1st Qu.:0.03623 Class :character Class :character
Median : 3200 Median :0.07434 Mode :character Mode :character
Mean : 5851 Mean :0.09281
3rd Qu.:13175 3rd Qu.:0.11257
Max. :26400 Max. :0.33071
Note_stimulus Type_prey Shape_prey Diet_bird
Length:117 Length:117 Length:117 Length:117
Class :character Class :character Class :character Class :character
Mode :character Mode :character Mode :character Mode :character
Bird_sex Bird_age Tn Cn
Length:117 Length:117 Min. : 4.00 Min. : 4.00
Class :character Class :character 1st Qu.: 8.00 1st Qu.: 8.00
Mode :character Mode :character Median : 9.00 Median : 9.00
Mean :14.73 Mean :14.26
3rd Qu.:15.00 3rd Qu.:15.00
Max. :89.00 Max. :89.00
T_mean C_mean MT_mean
Min. : 0.0004 Min. : 0.0400 Min. :-556.1000
1st Qu.: 0.7656 1st Qu.: 0.5079 1st Qu.: -6.8415
Median : 16.1000 Median : 9.3000 Median : 0.7544
Mean : 119.1540 Mean : 110.1728 Mean : -43.7981
3rd Qu.: 153.5000 3rd Qu.: 154.2000 3rd Qu.: 0.9522
Max. :1180.4878 Max. :2115.0000 Max. : 0.9996
NA's :16 NA's :16 NA's :81
MC_mean T_sd C_sd T_proportion
Min. :-2115.0000 Min. : 0.0100 Min. : 0.0500 Min. :0.01000
1st Qu.: -13.6000 1st Qu.: 0.5183 1st Qu.: 0.2859 1st Qu.:0.05258
Median : 0.5543 Median : 16.9814 Median : 4.7434 Median :0.27152
Mean : -121.8786 Mean : 82.2725 Mean : 78.2657 Mean :0.30879
3rd Qu.: 0.9174 3rd Qu.: 74.7486 3rd Qu.: 56.2141 3rd Qu.:0.49500
Max. : 0.9574 Max. :731.8482 Max. :1052.1749 Max. :0.82609
NA's :81 NA's :16 NA's :16 NA's :75
C_proportion Study_design Dataset Mean_median
Min. :0.04262 Length:117 Length:117 Length:117
1st Qu.:0.08262 Class :character Class :character Class :character
Median :0.26477 Mode :character Mode :character Mode :character
Mean :0.29854
3rd Qu.:0.50000
Max. :0.79618
NA's :75
T_mean_median C_mean_median Type_of_variance_statistic
Min. : 0.0004 Min. : 0.0000 Length:117
1st Qu.: 0.7656 1st Qu.: 0.6559 Class :character
Median : 12.0000 Median : 9.3000 Mode :character
Mean : 104.2470 Mean : 96.8310
3rd Qu.: 104.0000 3rd Qu.: 61.0000
Max. :1180.4878 Max. :2115.0000
T_se C_se T_variance_q1 T_variance_q3
Min. : 0.00000 Min. : 0.0000 Min. :77.5 Min. :246
1st Qu.: 0.09462 1st Qu.: 0.0903 1st Qu.:77.5 1st Qu.:246
Median : 4.88000 Median : 1.5000 Median :77.5 Median :246
Mean : 25.83973 Mean : 26.7360 Mean :77.5 Mean :246
3rd Qu.: 24.68328 3rd Qu.: 19.8747 3rd Qu.:77.5 3rd Qu.:246
Max. :182.92683 Max. :372.0000 Max. :77.5 Max. :246
NA's :20 NA's :20 NA's :116 NA's :116
C_variance_q1 C_variance_q3 Note lnRR
Min. :29 Min. :36 Length:117 Min. :-2.15769
1st Qu.:29 1st Qu.:36 Class :character 1st Qu.:-0.07696
Median :29 Median :36 Mode :character Median : 0.08779
Mean :29 Mean :36 Mean : 0.27498
3rd Qu.:29 3rd Qu.:36 3rd Qu.: 0.54880
Max. :29 Max. :36 Max. : 4.16777
NA's :116 NA's :116
lnRR_var Obs_ID Log_diameter Log_area
Min. :0.0008295 Min. : 1 Min. :0.7885 Min. :1.335
1st Qu.:0.0107871 1st Qu.: 30 1st Qu.:1.5041 1st Qu.:2.767
Median :0.0333636 Median : 59 Median :2.9957 Median :4.474
Mean :0.1249595 Mean : 59 Mean :2.4180 Mean :4.574
3rd Qu.:0.1655345 3rd Qu.: 88 3rd Qu.:3.2189 3rd Qu.:6.194
Max. :1.3885984 Max. :117 Max. :3.4430 Max. :6.196
Log_background
Min. : 5.416
1st Qu.: 6.908
Median : 8.071
Mean : 7.819
3rd Qu.: 9.486
Max. :10.181
Code
summary(dt_prey)
Study_ID Cohort_ID Shared_control_ID Year
Length:146 Length:146 Length:146 Min. :2003
Class :character Class :character Class :character 1st Qu.:2008
Mode :character Mode :character Mode :character Median :2012
Mean :2011
3rd Qu.:2013
Max. :2022
Country Data_source Data_location Bird_species
Length:146 Length:146 Length:146 Length:146
Class :character Class :character Class :character Class :character
Mode :character Mode :character Mode :character Mode :character
Bird_common_name Prey_species Prey_common_name Response
Length:146 Length:146 Length:146 Length:146
Class :character Class :character Class :character Class :character
Mode :character Mode :character Mode :character Mode :character
Measure Direction Detail_result Note_result
Length:146 Length:146 Length:146 Length:146
Class :character Class :character Class :character Class :character
Mode :character Mode :character Mode :character Mode :character
Treatment_stimulus Number_pattern Diameter_pattern Area_pattern
Length:146 Min. : 1.000 Min. : 1.700 Min. : 2.27
Class :character 1st Qu.: 2.000 1st Qu.: 4.500 1st Qu.: 15.90
Mode :character Median : 2.000 Median : 6.000 Median : 28.27
Mean : 2.397 Mean : 6.741 Mean : 36.04
3rd Qu.: 2.000 3rd Qu.: 8.380 3rd Qu.: 43.01
Max. :11.000 Max. :15.000 Max. :176.71
Area_background Area_ratio Shape_pattern Control_stimulus
Min. : 129.6 Min. :0.00816 Length:146 Length:146
1st Qu.: 625.0 1st Qu.:0.04661 Class :character Class :character
Median : 931.8 Median :0.08501 Mode :character Mode :character
Mean : 890.1 Mean :0.08681
3rd Qu.:1110.6 3rd Qu.:0.12315
Max. :2784.7 Max. :0.22893
Note_stimulus Type_prey Shape_prey Diet_bird
Length:146 Length:146 Length:146 Length:146
Class :character Class :character Class :character Class :character
Mode :character Mode :character Mode :character Mode :character
Bird_sex Bird_age Tn Cn
Length:146 Length:146 Min. : 7.708 Min. : 7.708
Class :character Class :character 1st Qu.: 20.000 1st Qu.: 20.000
Mode :character Mode :character Median : 80.000 Median : 80.000
Mean : 65.610 Mean : 65.616
3rd Qu.: 96.000 3rd Qu.: 96.000
Max. :160.000 Max. :160.000
T_mean C_mean MT_mean MC_mean
Min. :0.1148 Min. :0.1552 Min. :-6.1300 Min. :-4.3900
1st Qu.:0.4656 1st Qu.:0.3357 1st Qu.:-1.2048 1st Qu.:-0.9296
Median :0.7374 Median :0.4496 Median :-0.5582 Median :-0.3664
Mean :1.0794 Mean :0.8256 Mean :-0.6946 Mean :-0.4626
3rd Qu.:1.2864 3rd Qu.:1.1137 3rd Qu.:-0.1148 3rd Qu.:-0.1552
Max. :6.1300 Max. :4.3900 Max. : 0.8822 Max. : 0.9584
NA's :127 NA's :127 NA's :121 NA's :121
T_sd C_sd T_proportion C_proportion
Min. :0.1403 Min. :0.0864 Min. :0.01598 Min. :0.0100
1st Qu.:0.6219 1st Qu.:0.1422 1st Qu.:0.18705 1st Qu.:0.1100
Median :0.9192 Median :0.2532 Median :0.30000 Median :0.1621
Mean :1.2667 Mean :0.4709 Mean :0.34403 Mean :0.2490
3rd Qu.:1.8102 3rd Qu.:0.4555 3rd Qu.:0.45000 3rd Qu.:0.3608
Max. :5.4821 Max. :3.6547 Max. :0.90000 Max. :0.8333
NA's :124 NA's :124 NA's :19 NA's :19
Study_design Dataset Mean_median T_mean_median
Length:146 Length:146 Length:146 Min. :0.1085
Class :character Class :character Class :character 1st Qu.:0.4496
Mode :character Mode :character Mode :character Median :0.6934
Mean :1.0349
3rd Qu.:1.2320
Max. :6.1300
NA's :127
C_mean_median Type_of_variance_statistic T_se C_se
Min. :0.1424 Length:146 Min. :0.040 Min. :0.0200
1st Qu.:0.3137 Class :character 1st Qu.:0.055 1st Qu.:0.0350
Median :0.4112 Mode :character Median :0.065 Median :0.0450
Mean :0.7883 Mean :0.185 Mean :0.1225
3rd Qu.:1.0391 3rd Qu.:0.195 3rd Qu.:0.1325
Max. :4.3900 Max. :0.570 Max. :0.3800
NA's :127 NA's :142 NA's :142
T_variance_q1 T_variance_q3 C_variance_q1 C_variance_q3
Min. :0.07075 Min. :0.1651 Min. :0.1136 Min. :0.2096
1st Qu.:0.28640 1st Qu.:0.6584 1st Qu.:0.2594 1st Qu.:0.4316
Median :0.47294 Median :0.9294 Median :0.3159 Median :0.5600
Mean :0.52460 Mean :1.1200 Mean :0.4762 Mean :0.8185
3rd Qu.:0.72800 3rd Qu.:1.6352 3rd Qu.:0.7712 3rd Qu.:1.3267
Max. :1.22170 Max. :2.3216 Max. :0.9481 Max. :1.6880
NA's :128 NA's :128 NA's :128 NA's :128
Note lnRR lnRR_var Obs_ID
Length:146 Min. :-0.815486 Min. :0.002201 Min. : 1.00
Class :character 1st Qu.:-0.001665 1st Qu.:0.011064 1st Qu.: 37.25
Mode :character Median : 0.228398 Median :0.021493 Median : 73.50
Mean : 0.262303 Mean :0.060098 Mean : 73.50
3rd Qu.: 0.479181 3rd Qu.:0.051982 3rd Qu.:109.75
Max. : 2.247699 Max. :0.434523 Max. :146.00
Log_diameter Log_area Log_background
Min. :0.5306 Min. :0.8197 Min. :4.864
1st Qu.:1.5041 1st Qu.:2.7666 1st Qu.:6.438
Median :1.7918 Median :3.3420 Median :6.837
Mean :1.8182 Mean :3.3132 Mean :6.667
3rd Qu.:2.1258 3rd Qu.:3.7614 3rd Qu.:7.013
Max. :2.7081 Max. :5.1745 Max. :7.932
Code
summary(dt_all)
Study_ID Cohort_ID Shared_control_ID Year
Length:263 Length:263 Length:263 Min. :1957
Class :character Class :character Class :character 1st Qu.:2009
Mode :character Mode :character Mode :character Median :2010
Mean :2009
3rd Qu.:2013
Max. :2022
Country Data_source Data_location Bird_species
Length:263 Length:263 Length:263 Length:263
Class :character Class :character Class :character Class :character
Mode :character Mode :character Mode :character Mode :character
Bird_common_name Prey_species Prey_common_name Response
Length:263 Length:263 Length:263 Length:263
Class :character Class :character Class :character Class :character
Mode :character Mode :character Mode :character Mode :character
Measure Direction Detail_result Note_result
Length:263 Length:263 Length:263 Length:263
Class :character Class :character Class :character Class :character
Mode :character Mode :character Mode :character Mode :character
Treatment_stimulus Number_pattern Diameter_pattern Area_pattern
Length:263 Min. : 1.000 Min. : 1.70 Min. : 2.27
Class :character 1st Qu.: 2.000 1st Qu.: 4.50 1st Qu.: 15.90
Mode :character Median : 2.000 Median : 7.00 Median : 38.48
Mean : 2.194 Mean :10.55 Mean :133.28
3rd Qu.: 2.000 3rd Qu.:11.54 3rd Qu.: 81.50
Max. :11.000 Max. :31.28 Max. :490.87
Area_background Area_ratio Shape_pattern Control_stimulus
Min. : 129.6 Min. :0.00816 Length:263 Length:263
1st Qu.: 697.5 1st Qu.:0.03872 Class :character Class :character
Median : 1040.0 Median :0.07434 Mode :character Mode :character
Mean : 3097.0 Mean :0.08947
3rd Qu.: 1444.0 3rd Qu.:0.12315
Max. :26400.0 Max. :0.33071
Note_stimulus Type_prey Shape_prey Diet_bird
Length:263 Length:263 Length:263 Length:263
Class :character Class :character Class :character Class :character
Mode :character Mode :character Mode :character Mode :character
Bird_sex Bird_age Tn Cn
Length:263 Length:263 Min. : 4.00 Min. : 4.00
Class :character Class :character 1st Qu.: 8.00 1st Qu.: 8.00
Mode :character Mode :character Median : 20.00 Median : 20.00
Mean : 42.97 Mean : 42.77
3rd Qu.: 82.00 3rd Qu.: 82.00
Max. :160.00 Max. :160.00
T_mean C_mean MT_mean
Min. : 0.0004 Min. : 0.0400 Min. :-556.1000
1st Qu.: 0.6021 1st Qu.: 0.3675 1st Qu.: -1.3776
Median : 7.2595 Median : 3.9950 Median : -0.1148
Mean : 100.4589 Mean : 92.8595 Mean : -26.1327
3rd Qu.: 93.1250 3rd Qu.: 56.6866 3rd Qu.: 0.8822
Max. :1180.4878 Max. :2115.0000 Max. : 0.9996
NA's :143 NA's :143 NA's :202
MC_mean T_sd C_sd T_proportion
Min. :-2115.0000 Min. : 0.0100 Min. : 0.050 Min. :0.0100
1st Qu.: -1.1749 1st Qu.: 0.5278 1st Qu.: 0.229 1st Qu.:0.1667
Median : -0.1552 Median : 4.2319 Median : 2.711 Median :0.2984
Mean : -72.1179 Mean : 67.7837 Mean : 64.351 Mean :0.3353
3rd Qu.: 0.8949 3rd Qu.: 59.4457 3rd Qu.: 52.998 3rd Qu.:0.4713
Max. : 0.9584 Max. :731.8482 Max. :1052.175 Max. :0.9000
NA's :202 NA's :140 NA's :140 NA's :94
C_proportion Study_design Dataset Mean_median
Min. :0.0100 Length:263 Length:263 Length:263
1st Qu.:0.1045 Class :character Class :character Class :character
Median :0.1770 Mode :character Mode :character Mode :character
Mean :0.2613
3rd Qu.:0.4000
Max. :0.8333
NA's :94
T_mean_median C_mean_median Type_of_variance_statistic
Min. : 0.0004 Min. : 0.0000 Length:263
1st Qu.: 0.6584 1st Qu.: 0.4022 Class :character
Median : 7.2766 Median : 4.7365 Mode :character
Mean : 89.8277 Mean : 83.4133
3rd Qu.: 58.0122 3rd Qu.: 46.5061
Max. :1180.4878 Max. :2115.0000
NA's :127 NA's :127
T_se C_se T_variance_q1 T_variance_q3
Min. : 0.00000 Min. : 0.0000 Min. : 0.07075 Min. : 0.1651
1st Qu.: 0.08208 1st Qu.: 0.0877 1st Qu.: 0.28640 1st Qu.: 0.6656
Median : 3.52000 Median : 1.1000 Median : 0.50720 Median : 0.9296
Mean : 24.82370 Mean : 25.6820 Mean : 4.57594 Mean : 14.0085
3rd Qu.: 24.55107 3rd Qu.: 19.8747 3rd Qu.: 0.78560 3rd Qu.: 1.7799
Max. :182.92683 Max. :372.0000 Max. :77.50000 Max. :246.0000
NA's :162 NA's :162 NA's :244 NA's :244
C_variance_q1 C_variance_q3 Note lnRR
Min. : 0.1136 Min. : 0.2096 Length:263 Min. :-2.15769
1st Qu.: 0.2594 1st Qu.: 0.4340 Class :character 1st Qu.:-0.04159
Median : 0.3440 Median : 0.5936 Mode :character Median : 0.15315
Mean : 1.9774 Mean : 2.6702 Mean : 0.26794
3rd Qu.: 0.8048 3rd Qu.: 1.4151 3rd Qu.: 0.49057
Max. :29.0000 Max. :36.0000 Max. : 4.16777
NA's :244 NA's :244
lnRR_var Obs_ID Log_diameter Log_area
Min. :0.0008295 Min. : 1.0 Min. :0.5306 Min. :0.8197
1st Qu.:0.0108688 1st Qu.: 66.5 1st Qu.:1.5041 1st Qu.:2.7666
Median :0.0238924 Median :132.0 Median :1.9459 Median :3.6503
Mean :0.0889528 Mean :132.0 Mean :2.0850 Mean :3.8740
3rd Qu.:0.0743148 3rd Qu.:197.5 3rd Qu.:2.4456 3rd Qu.:4.4006
Max. :1.3885984 Max. :263.0 Max. :3.4430 Max. :6.1962
Log_background
Min. : 4.864
1st Qu.: 6.542
Median : 6.947
Mean : 7.179
3rd Qu.: 7.275
Max. :10.181
I cannot attach the caption to datatable() format table. I need to use kable() format table?
Code
datatable(dt_all, caption ="Dataset for meta-analysis", options =list(pageLength =10, scrollX =TRUE))
Table 2 - Dataset for meta-analysis
If phylogeny do not explain heterogeniety much, we will not need to consider it and the two datasets can be merged.
We used meta-analytical models to calculate total I2 (a measure of heterogeneity not caused by sampling error; Higgins. et al., 2003) and the partial I2 explained by each random factor.
Based on this, we need not to consider phylogenetic relatedness from our meta-regressions as this random factor did not explain much of the heterogeneity between effect sizes (partial I2 < 0.001%), then we can combine two datasets (predator and prey) for meta-analysis.
Code
phy_model <-function(cor_tree = vcv_tree){ model <-rma.mv(yi = lnRR,V = VCV_pred,random =list(~1| Study_ID,~1| Shared_control_ID,~1| Cohort_ID,~1| Obs_ID,~1| Bird_species,~1| Phylogeny),R =list(Phylogeny = cor_tree),test ="t",method ="REML",sparse =TRUE,data = dat_pred) model}tree_50 <- trees[1:50]vcv_tree_50 <-map(tree_50, ~vcv(.x, corr =TRUE))# Run multiple meta-analyses with 50 different trees and obtain the combined resultma_50 <-mclapply(vcv_tree_50, phy_model, mc.cores =8)
Code
ma_50 <-readRDS(here("Rdata", "ma_50.RDS"))# combining the resultsest_50 <-map_dbl(ma_50, ~ .x$b[[1]])se_50 <-map_dbl(ma_50, ~ .x$se)df_50 <-c(rbind(est_50, se_50))# creating an array required by pool.mimy_array <-array(df_50, dim =c(1, 2, 50))com_res <-round(pool.mi(my_array), 4)
Code
knitr::kable(com_res, caption ="Combined result of 50 phylogenetic trees")
We used meta-analytical models to calculate total I2 (a measure of heterogeneity not caused by sampling error; Higgins. et al., 2003) and the partial I2 explained by each random factor.
Our dataset includes 4 types of prey type: real butterfly, abstract butterfly, abstract caterpillar, and abstract prey. Is there significant difference of effect size between two stimuli?
orchard_plot(pred_mr_prey_shape,mod ="Shape_prey",group ="Study_ID",xlab ="Shape of prey",angle =45) +scale_colour_okabe_ito(order =6:9)+scale_fill_okabe_ito(order =6:9)
Figure 4— Effect size and prey shape
2.2 Correlation visualisation and choose moderators for multi-moderator meta-regression in predator dataset
Before we run multi-moderator meta-regressions, we need to consider the correlation between moderators. Area, diameter and background seem to be correlated. We visualised the correlation between these variables.
Figure 6— Correlation between categorical variables
We should not include “Shape_prey” and “Type_prey” in the model at the same time. Because they are correlated.
We used model R2 values to find better model and modelator VIF values to check multicollinearity between moderators. Higher R2 indicates better model and VIF > 2 indicates multicollinearity.
# these figs were created by multi meta-regression model results# log-transformed areapred_p4 <-bubble_plot(pred_mr_area,mod ="Log_area",group ="Study_ID",xlab ="Log-transformed area") +scale_x_continuous(breaks =seq(0,7,1.5)) +scale_y_continuous(breaks =seq(-2.5, 4.5, 1.5))# number of patternspred_p5 <-bubble_plot(pred_mr_num,mod ="Number_pattern",group ="Study_ID",xlab ="Number of patterns") +scale_x_continuous(breaks =seq(0,11,1.5)) +scale_y_continuous(breaks =seq(-2.5, 4.5, 1.5))# combinepred_p4 / pred_p5 +plot_annotation(tag_levels ="a")# output figure as pdf# ggsave("fig2_multi.pdf", width = 10, height = 10, dpi = 450)
Figure 14— Continuous moderators
Code
# funnel plot# pdf("fig3.pdf")funnel(ma_pred, yaxis ="seinv", xlab ="Standarised residuals",ylab ="Precision (inverse of SE)",xlim =c(-4.0, 4.5), ylim =c(0.01, 80.0), col =c(alpha("mediumvioletred", 0.5)),cex =0.7)# dev.off()# Egger's test and decline effectpred_p7 <-bubble_plot(pred_bias_model,mod ="sqrt_inv_e_n",group ="Study_ID",xlab ="Square root of inverse of effective sample size") +scale_y_continuous(breaks =seq(-2.5, 4.5, 1.5)) pred_p8 <-bubble_plot(pred_year_model,mod ="Year",group ="Study_ID",xlab ="Year of publication") +scale_y_continuous(breaks =seq(-2.5, 4.0, 1.5)) # combine plots created by bubble_plot()pred_pub <- pred_p7 / pred_p8pred_pub +plot_annotation(tag_levels ='a') # output figure as pdf# ggsave("fig4.pdf", width = 10, height = 10, dpi = 450)
Figure 15— Funnel plot
Figure 16— Egger’s test and Decline effect
Figure 17— Publication bias
3 Meta-analysis - prey dataset
We used meta-analytical models to calculate total I2 (a measure of heterogeneity not caused by sampling error; Higgins. et al., 2003) and the partial I2 explained by each random factor.
Our dataset includes 4 types of prey type: real butterfly, abstract butterfly, abstract caterpillar, and abstract prey. Is there significant difference of effect size between two stimuli?
orchard_plot(prey_mr_prey_shape,mod ="Shape_prey",group ="Study_ID",xlab ="Shape of prey",angle =45) +scale_colour_okabe_ito(order =6:9)+scale_fill_okabe_ito(order =6:9)
Figure 20— Effect size and prey shape
3.2 Correlation visualisation and choose moderators for multi-moderator meta-regression in preyator dataset
Before we run multi-moderator meta-regressions, we need to consider the correlation between moderators. Area, diameter and background seem to be correlated. We visualised the correlation between these variables.
Figure 22— Correlation between categorical variables
We should not include “Shape_prey” and “Type_prey” in the model at the same time. Because they are correlated.
We used model R2 values to find better model and modelator VIF values to check multicollinearity between moderators. Higher R2 indicates better model and VIF > 2 indicates multicollinearity.
# these figs were created by multi meta-regression model results# log-transformed areaprey_p4 <-bubble_plot(prey_mr_area,mod ="Log_area",group ="Study_ID",xlab ="Log-transformed area") +scale_x_continuous(breaks =seq(0,7,1.5)) +scale_y_continuous(breaks =seq(-2.5, 4.5, 1.5))# number of patternsprey_p5 <-bubble_plot(prey_mr_num,mod ="Number_pattern",group ="Study_ID",xlab ="Number of patterns") +scale_x_continuous(breaks =seq(0,11,1.5)) +scale_y_continuous(breaks =seq(-2.5, 4.5, 1.5))# combineprey_p4 / prey_p5 +plot_annotation(tag_levels ="a")# output figure as pdf# ggsave("fig2_multi.pdf", width = 10, height = 10, dpi = 450)
Figure 30— Continuous moderators
3.6.3 Publication bias
Code
# funnel plot# pdf("fig3.pdf")funnel(ma_prey, yaxis ="seinv", xlab ="Standarised residuals",ylab ="Precision (inverse of SE)",xlim =c(-4.0, 4.5), ylim =c(0.01, 80.0), col =c(alpha("mediumvioletred", 0.5)),cex =0.7)# dev.off()# Egger's test and decline effectprey_p7 <-bubble_plot(prey_bias_model,mod ="sqrt_inv_e_n",group ="Study_ID",xlab ="Square root of inverse of effective sample size") +scale_y_continuous(breaks =seq(-2.5, 4.5, 1.5)) prey_p8 <-bubble_plot(prey_year_model,mod ="Year",group ="Study_ID",xlab ="Year of publication") +scale_y_continuous(breaks =seq(-2.5, 4.0, 1.5)) # combine plots created by bubble_plot()prey_pub <- prey_p7 / prey_p8prey_pub +plot_annotation(tag_levels ='a') # output figure as pdf# ggsave("fig4.pdf", width = 10, height = 10, dpi = 450)
(a) Funnel plot
(b) Egger’s test and Decline effect
Figure 31— Publication bias
4 Meta-analysis - all dataset
We used meta-analytical models to calculate total I2 (a measure of heterogeneity not caused by sampling error; Higgins. et al., 2003) and the partial I2 explained by each random factor.
Which random effects remove in our models?
We can remove Shared control ID and Cohort ID
Code
# I exclude cohort_ID because sigma^2.2 = 0 and I2 = 0ma_all <-rma.mv(yi = lnRR,V = VCV, random =list(~1| Study_ID,~1| Shared_control_ID,~1| Cohort_ID,~1| Obs_ID),test ="t",method ="REML", sparse =TRUE,data = dt_all)summary(ma_all)
Our dataset includes 4 types of prey type: real butterfly, abstract butterfly, abstract caterpillar, and abstract prey. Is there significant difference of effect size between two stimuli?
mat_ex <-cbind(contrMat(rep(1,length(mr_prey_shape$ci.ub)),type ="Tukey"))sig_test <-summary(glht(mr_prey_shape, linfct= mat_ex), test =adjusted("none"))sig_test
Simultaneous Tests for General Linear Hypotheses
Fit: rma.mv(yi = lnRR, V = VCV, mods = ~Shape_prey - 1, random = list(~1 |
Study_ID, ~1 | Obs_ID), data = dt_all, method = "REML", test = "t",
sparse = TRUE)
Linear Hypotheses:
Estimate Std. Error z value Pr(>|z|)
2 - 1 == 0 -0.25592 0.16791 -1.524 0.127
3 - 1 == 0 -0.30966 0.21673 -1.429 0.153
4 - 1 == 0 -0.06227 0.15309 -0.407 0.684
3 - 2 == 0 -0.05373 0.22768 -0.236 0.813
4 - 2 == 0 0.19365 0.16823 1.151 0.250
4 - 3 == 0 0.24739 0.21698 1.140 0.254
(Adjusted p values reported -- none method)
R2_marginal
R2_conditional
0.0542
0.2338
Table XX. Model goodness-of-fit
Code
orchard_plot(mr_prey_shape,mod ="Shape_prey",group ="Study_ID",xlab ="Shape of prey",angle =45) +scale_colour_okabe_ito(order =6:9)+scale_fill_okabe_ito(order =6:9)
Figure 34— Effect size and prey shape
4.2 Correlation visualisation and choose moderators
Before we run multi-moderator meta-regressions, we need to consider the correlation between moderators. Area, diameter and background seem to be correlated. We visualised the correlation between these variables.
Figure 36— Correlation between categorical variables
We should not include “Shape_prey” and “Type_prey” in the model at the same time. Because they are correlated.
We used model R2 values to find better model and modelator VIF values to check multicollinearity between moderators. Higher R2 indicates better model and VIF > 2 indicates multicollinearity.